package com.huazi.www.doctor.doctorc.util;

import java.util.List;

public class Page<E> {
    private Integer totalPageCount;//总记录数
    private Integer pageSize;//显示的条数
    private Integer totalCount;//分页的总页数
    private Integer currPageNo;//当前下标
    private List<E> list;//显示数据的集合

    public Integer getTotalPageCount() {
        return totalPageCount;
    }

    public void setTotalPageCount(Integer totalPageCount) {
        this.totalPageCount = totalPageCount;
        this.totalCount = this.totalPageCount % this.pageSize == 0 ? this.totalPageCount / pageSize : this.totalPageCount / pageSize + 1;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Integer getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(Integer totalCount) {
        this.totalCount = totalCount;
    }

    public Integer getCurrPageNo() {
        return currPageNo;
    }

    public void setCurrPageNo(Integer currPageNo) {
        this.currPageNo = currPageNo;
    }

    public List<E> getList() {
        return list;
    }

    public void setList(List<E> list) {
        this.list = list;
    }


    public Page(Integer totalPageCount, Integer pageSize, Integer totalCount, Integer currPageNo, List<E> list) {
        this.totalPageCount = totalPageCount;
        this.pageSize = pageSize;
        this.totalCount = totalCount;
        this.currPageNo = currPageNo;
        this.list = list;
    }

    public Page() {
    }
}
